package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the SCHEDULING database table.
 * 
 */
@Entity
@NamedQuery(name="Scheduling.findAll", query="SELECT s FROM Scheduling s")
public class Scheduling implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SCHEDULING_SCHEDUID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SCHEDULING_SCHEDUID_GENERATOR")
	@Column(name="SCHEDU_ID")
	private long scheduId;

	@Column(name="\"CYCLE\"")
	private BigDecimal cycle;

	@Column(name="SCHEDU_CURRENTCYCLE")
	private BigDecimal scheduCurrentcycle;

	@Column(name="SCHEDU_CURRENTDATE")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Timestamp scheduCurrentdate;

	@Column(name="SCHEDU_CURRENTTEAM")
	private BigDecimal scheduCurrentteam;

	@Column(name="SCHEDU_ENABLEDATE")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Timestamp scheduEnabledate;

	@Column(name="SCHEDU_ENDUPDATE")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Timestamp scheduEndupdate;

	@Column(name="SCHEDU_FOUNDDATE")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Timestamp scheduFounddate;

	@Column(name="SCHEDU_NAME")
	private String scheduName;

	@Column(name="SCHEDU_PERSON")
	private String scheduPerson;

	@Column(name="SCHEDU_REMARKS")
	private String scheduRemarks;

	@Column(name="SCHEDU_STATE")
	private BigDecimal scheduState;

	@Column(name="SCHEDU_TEAM")
	private BigDecimal scheduTeam;

	@Column(name="SCHEDU_UPDATE")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Timestamp scheduUpdate;

	//bi-directional many-to-one association to Paibanplan
	@OneToMany(mappedBy="scheduling")
	@JSONField(serialize=false)
	private List<Paibanplan> paibanplans;

	public Scheduling() {
	}

	public long getScheduId() {
		return this.scheduId;
	}

	public void setScheduId(long scheduId) {
		this.scheduId = scheduId;
	}

	public BigDecimal getCycle() {
		return this.cycle;
	}

	public void setCycle(BigDecimal cycle) {
		this.cycle = cycle;
	}

	public BigDecimal getScheduCurrentcycle() {
		return this.scheduCurrentcycle;
	}

	public void setScheduCurrentcycle(BigDecimal scheduCurrentcycle) {
		this.scheduCurrentcycle = scheduCurrentcycle;
	}

	public Timestamp getScheduCurrentdate() {
		return this.scheduCurrentdate;
	}

	public void setScheduCurrentdate(Timestamp scheduCurrentdate) {
		this.scheduCurrentdate = scheduCurrentdate;
	}

	public BigDecimal getScheduCurrentteam() {
		return this.scheduCurrentteam;
	}

	public void setScheduCurrentteam(BigDecimal scheduCurrentteam) {
		this.scheduCurrentteam = scheduCurrentteam;
	}

	public Timestamp getScheduEnabledate() {
		return this.scheduEnabledate;
	}

	public void setScheduEnabledate(Timestamp scheduEnabledate) {
		this.scheduEnabledate = scheduEnabledate;
	}

	public Timestamp getScheduEndupdate() {
		return this.scheduEndupdate;
	}

	public void setScheduEndupdate(Timestamp scheduEndupdate) {
		this.scheduEndupdate = scheduEndupdate;
	}

	public Timestamp getScheduFounddate() {
		return this.scheduFounddate;
	}

	public void setScheduFounddate(Timestamp scheduFounddate) {
		this.scheduFounddate = scheduFounddate;
	}

	public String getScheduName() {
		return this.scheduName;
	}

	public void setScheduName(String scheduName) {
		this.scheduName = scheduName;
	}

	public String getScheduPerson() {
		return this.scheduPerson;
	}

	public void setScheduPerson(String scheduPerson) {
		this.scheduPerson = scheduPerson;
	}

	public String getScheduRemarks() {
		return this.scheduRemarks;
	}

	public void setScheduRemarks(String scheduRemarks) {
		this.scheduRemarks = scheduRemarks;
	}

	public BigDecimal getScheduState() {
		return this.scheduState;
	}

	public void setScheduState(BigDecimal scheduState) {
		this.scheduState = scheduState;
	}

	public BigDecimal getScheduTeam() {
		return this.scheduTeam;
	}

	public void setScheduTeam(BigDecimal scheduTeam) {
		this.scheduTeam = scheduTeam;
	}

	public Timestamp getScheduUpdate() {
		return this.scheduUpdate;
	}

	public void setScheduUpdate(Timestamp scheduUpdate) {
		this.scheduUpdate = scheduUpdate;
	}

	public List<Paibanplan> getPaibanplans() {
		return this.paibanplans;
	}

	public void setPaibanplans(List<Paibanplan> paibanplans) {
		this.paibanplans = paibanplans;
	}

	public Paibanplan addPaibanplan(Paibanplan paibanplan) {
		getPaibanplans().add(paibanplan);
		paibanplan.setScheduling(this);

		return paibanplan;
	}

	public Paibanplan removePaibanplan(Paibanplan paibanplan) {
		getPaibanplans().remove(paibanplan);
		paibanplan.setScheduling(null);

		return paibanplan;
	}

}